package com.wicket.okrcalc.integration.dto;

import com.wicket.okrcalc.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import javax.validation.constraints.NotNull;
import lombok.Data;

/**
 * @desc KeyFocusTaskDto
 * @使用场景
 */
@Data
public class KeyFocusTaskDto extends BaseDto implements Serializable {

  /**
   * 重点关注内容ID
   */
  @ApiModelProperty("重点关注内容ID")
  private String keyFocusContentId;

  /**
   * 任务名称
   */
  @ApiModelProperty("任务名称")
  private String taskName;

  /**
   * 数据值结果
   */
  @ApiModelProperty("数据值结果")
  private Double dataResult;

  /**
   * 冗余单位 TIMES:次 DOOR:门 PART:部 SET:套 INDIVIDUAL:个 YUAN:元 NNT:人 PIECE:篇 TERM:项 FEN:分 WAN_YUAN:万元 PERCENT:1111百分率 PORTION:份 %:%
   */
  @ApiModelProperty("冗余单位")
  private String unit;

  /**
   * 周期类型实例简称
   */
  @ApiModelProperty("周期类型实例简称")
  private String cycleNumberShortName;

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;
    KeyFocusTaskDto that = (KeyFocusTaskDto) o;
    return (
      keyFocusContentId == that.keyFocusContentId &&
      taskName == that.taskName &&
      dataResult == that.dataResult &&
      unit == that.unit &&
      cycleNumberShortName == that.cycleNumberShortName
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(
      super.hashCode(),
      keyFocusContentId,
      taskName,
      dataResult,
      unit,
      cycleNumberShortName
    );
  }

}
